package com.wan.lession.aop;
import org.aopalliance.aop.Advice;
import org.springframework.aop.AfterReturningAdvice;

import java.lang.reflect.Method;
/**
 * @author anning
 */
public class MyAfterAdvice implements AfterReturningAdvice, Advice {
    @Override
    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
        System.out.println("这个就是后置增强");
        System.out.println("被增强的方法:"+method.getName());
        System.out.println("被增强的方法的返回值:"+returnValue);
    }
}
